#include <iostream>
#include <deque>
using namespace std;

template<class T>
void print_deq(T &deq)
{
    typename T::iterator it;
    for (it=deq.begin();it!=deq.end();it++)
    {
        cout <<*it<<", ";
    }
    cout<<endl;
}

int main()
{
    deque<char> d;
    d.push_back('c');
    d.push_back('a');
    d.push_front('5');

    print_deq(d);
}
